<?php

class Mapmodel extends Model 
{
	
	function Mapmodel()
	{
		//Constructor
		parent::Model();
		
	}
	
	function getAllLocation()
	{
		$status = "public";
		$this->db->select('*');
		$this->db->where('photo_status', $status);
		$this->db->where('latitude !=', '');
		$this->db->where('longitude !=', '');
		$query = $this->db->get('photos');
		
		if($query->num_rows() > 0)
		{
			foreach($query->result_array() as $row)
			{
				$location[] = $row;
			}
			return $location;
		}
		else
		{
			return FALSE;
		}
	}
}
